#include <stdio.h>
void twosum(int nums[],int *sum1,int *sum2,int size)
{
    *sum1=0;
    *sum2=0;
    for(int i=0;i<size;i++)
    {
        *sum1+=nums[i];
    }
}


int main()
{
    int size;
    printf("输入数组的大小：");
    scanf("%d", &size);

    int nums[size];
    printf("输入数组的元素:\n");
    for (int i = 0; i < size; i++)
    {
        scanf("%d", &nums[i]);
    }
    int sum1,sum2;
    twosum(nums,&sum1, &sum2,size);
    printf("总和为：%d\n",sum1+sum2);
    return 0;
}